package edu.famework.weekly2;

import java.util.Scanner;

public class User {
    Scanner input = new Scanner(System.in);

    /**
     * 设置进入界面
     */
    public void prin() {
        System.out.println("**********************");
        System.out.println("*****   猜拳   开始*****");
        System.out.println("**********************");
    }

    /**
     * inpuser实现用户的输入和
     *
     * @return
     */
    public void inpuser() {
        System.out.println("请选择对方的角色:");
        int a = input.nextInt();
        String role = null;
        if (a == 1) {
            role = "刘备";
            System.out.println(role);
        } else if (a == 2) {
            role = "孙权";
            System.out.println(role);
        } else if (a == 3) {
            role = "曹操";
            System.out.println(role);
        }
        System.out.println("请输入你的姓名：");
        String name = input.next();
        System.out.println(name);

        System.out.println("tom vs" + role + "对战");

        System.out.println("要开始吗？");
        User user = new User();
        if (user.equals("y")) {
            return;
        } else {
            System.exit(0);
        }
    }
}

